// index.ts
// 获取应用实例
const app = getApp<IAppOption>();
const defaultAvatarUrl =
    "https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0";

import {
    getA,
    getB,
    getC,
    getD,
    getE,
    getF,
    getG,
    getH,
    getI,
    getJ,
    getK,
    getL,
    getM,
    getN,
    getO,
    getP,
    getQ,
    getR,
    getS,
    getT,
    getU,
    getV,
    getW,
    getX,
} from "../../utils/util";

Component({
    data: {
        a: 0,
        b: 0,
        c: 0,
        d: 0,
        e: 0,
        f: 0,
        g: 0,
        h: 0,
        i: 0,
        j: 0,
        k: 0,
        l: 0,
        m: 0,
        n: 0,
        o: 0,
        p: 0,
        q: 0,
        r: 0,
        s: 0,
        t: 0,
        u: 0,
        v: 0,
        w: 0,
        x: 0,
    },
    methods: {
        // 事件处理函数
        bindDateChange: function (event: any) {
            const a = getA(event.detail.value);
            const b = getB(event.detail.value);
            const c = getC(event.detail.value);
            const d = getD(event.detail.value);
            const e = getE(event.detail.value);
            const f = getF(event.detail.value);
            const g = getG(event.detail.value);
            const h = getH(event.detail.value);
            const i = getI(event.detail.value);
            const j = getJ(event.detail.value);
            const k = getK(event.detail.value);
            const l = getL(event.detail.value);
            const m = getM(event.detail.value);
            const n = getN(event.detail.value);
            const o = getO(event.detail.value);
            const p = getP(event.detail.value);
            const q = getQ(event.detail.value);
            const r = getR(event.detail.value);
            const s = getS(event.detail.value);
            const t = getT(event.detail.value);
            const u = getU(event.detail.value);
            const v = getV(event.detail.value);
            const w = getW(event.detail.value);
            const x = getX(event.detail.value);
            this.setData({
                a,
                b,
                c,
                d,
                e,
                f,
                g,
                h,
                i,
                j,
                k,
                l,
                m,
                n,
                o,
                p,
                q,
                r,
                s,
                t,
                u,
                v,
                w,
                x,
            });
        },
    },
    lifetimes: {
        ready: function () {
            const currentDate = "1997-01-27";
            const a = getA(currentDate);
            const b = getB(currentDate);
            const c = getC(currentDate);
            const d = getD(currentDate);
            const e = getE(currentDate);
            const f = getF(currentDate);
            const g = getG(currentDate);
            const h = getH(currentDate);
            const i = getI(currentDate);
            const j = getJ(currentDate);
            const k = getK(currentDate);
            const l = getL(currentDate);
            const m = getM(currentDate);
            const n = getN(currentDate);
            const o = getO(currentDate);
            const p = getP(currentDate);
            const q = getQ(currentDate);
            const r = getR(currentDate);
            const s = getS(currentDate);
            const t = getT(currentDate);
            const u = getU(currentDate);
            const v = getV(currentDate);
            const w = getW(currentDate);
            const x = getX(currentDate);
            this.setData({
                a,
                b,
                c,
                d,
                e,
                f,
                g,
                h,
                i,
                j,
                k,
                l,
                m,
                n,
                o,
                p,
                q,
                r,
                s,
                t,
                u,
                v,
                w,
                x,
            });
        },
    },
});
